package com.gfxy.modules.items.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gfxy.modules.items.entity.Kss;
import com.gfxy.modules.items.mapper.KssMapper;
import com.gfxy.modules.items.service.IKssService;
import com.gfxy.modules.items.vo.KssMemberPage;
import com.gfxy.modules.items.vo.XssMemberPage;
import org.apache.poi.ss.usermodel.Row;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.io.Serializable;
import java.util.List;
import java.util.Collection;

/**
 * @Description: 课时数
 * @Author: jeecg-boot
 * @Date:   2023-12-28
 * @Version: V1.0
 */
@Service
public class KssServiceImpl extends AbstractProjectServiceImpl<KssMapper, Kss> implements IKssService {


	@Override
	public IPage<KssMemberPage> selectListPage(String date, Integer pageNo, Integer pageSize) {
		Page<KssMemberPage> page = new Page<>(pageNo, pageSize);

		Page<KssMemberPage> page1 = page.setRecords(baseMapper.selectMemberPageListByYear(date));
		return page1;
	}

	@Override
	public List<KssMemberPage> getMemberPageListByYear(String date) {
		return baseMapper.selectMemberPageListByYear(date);
	}

	@Override
	public Double getTotalScore(Kss kss) {
		int classTimeNum = kss.getClasstimeNum();

		return classTimeNum * 0.05;
	}

	@Override
	protected Kss getOneProject(Row row) {
		return null;
	}
}
